package com.study.admin.controller;

import com.study.admin.service.ITenantService;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ysl
 * @create 2024/11/18 10:50
 */
@RestController
@RequestMapping("/test")
@FieldDefaults(makeFinal=true, level= AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class TestController {

    ITenantService tenantService;

    @Autowired
    private OssConfig config;

    @GetMapping("/test")
    public String test(){
        return  config.getType();
    }

    @GetMapping("/getTenantList")
    public Object getTenantList(){
        return tenantService.list();
    }

}
